﻿using System;

namespace SDCloudSolution.SDCloud.BusinessLayer.Utils
{
    public static class ComponentValidationHelper
    {
        public static void EnsureValidId(int identifier, string parameterName)
        {
            if (identifier <= 0)
            {
                throw new ArgumentOutOfRangeException(parameterName, identifier, "Identifier should be greater that zero");
            }
        }

        public static void EnsureIsNotNull(object value, string parameterName)
        {
            if (value == null)
            {
                throw new ArgumentNullException(parameterName);
            }
        }
    }
}
